/*
 * Copyright (c) 2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import { SIDE_POSITION } from './types';

export const DEFAULT_SIDE_POSITION = SIDE_POSITION.LEFT;
export const DEFAULT_ANIMATE_ON_MOUNT = true;
export const DEFAULT_DYNAMIC_SIZING = false;
export const DEFAULT_ENABLE_CONTENT_PANNING_GESTURE = false;
export const DEFAULT_ENABLE_HANDLE_PANNING_GESTURE = true;
export const DEFAULT_ENABLE_OVER_DRAG = true;
export const DEFAULT_ENABLE_PAN_TO_CLOSE = true;
export const DEFAULT_ENABLE_DRAG_TO_CLOSE = true;
export const DEFAULT_KEYBOARD_BEHAVIOR = 'interactive';
export const DEFAULT_KEYBOARD_BLUR_BEHAVIOR = 'none';
export const DEFAULT_OVER_DRAG_RESISTANCE_FACTOR = 2.5;
export const DEFAULT_SPRING_DAMPING = 500;
export const DEFAULT_SPRING_STIFFNESS = 1000;
export const DEFAULT_SPRING_MASS = 3;
export const DEFAULT_SPRING_OVERSHOOT_CLAMPING = true;
export const DEFAULT_SPRING_REST_DISPLACEMENT_THRESHOLD = 10;
export const DEFAULT_SPRING_REST_SPEED_THRESHOLD = 10;
export const DEFAULT_TIMING_EASING = undefined;
export const DEFAULT_TIMING_DURATION = 250;

export const DEFAULT_SNAP_POINT = '50%';
export const MAX_SNAP_POINT_PERCENTAGE = 0.85; // 85%
export const MIN_SNAP_POINT_PERCENTAGE = 0.4; // 40%
export const DRAG_TO_CLOSE_THRESHOLD_PERCENTAGE = 0.33; // 33%

export const SIDE_SHEET_STATE = {
  CLOSED: -1,
  OPENED: 0,
} as const;

export const NORMAL_VELOCITY_THRESHOLD = 10;
export const NORMAL_DECELERATION_THRESHOLD = 0.1;
// 手势关闭的速度阈值（像素/秒）
export const GESTURE_VELOCITY_THRESHOLD = 200;
// 手势关闭的距离阈值（百分比）
export const GESTURE_DISTANCE_THRESHOLD = 0.2;
// 手势关闭的最小拖动距离（像素）
export const GESTURE_MIN_DRAG_DISTANCE = 10;

export const DEFAULT_HANDLE_WIDTH = 4;
export const DEFAULT_HANDLE_HEIGHT = 24;

export const DEFAULT_TOP_INSET = 0;
export const DEFAULT_BOTTOM_INSET = 0;

export const DEFAULT_SHOW_HEADER = false;
export const DEFAULT_HEADER_HEIGHT = 52;
export const DEFAULT_HEADER_CLOSE_BUTTON_COLOR = '#0F294D';